<%-- 
    Document   : addGroup
    Created on : 2009-4-25, 16:17:26
    Author     : 47
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <%@include file="/main/head.jspf" %>
        <title>添加新用户组</title>
        <script language="javascript" charset="UTF-8">
            function addgroup(){
                if(checkValue()){
                    document.getElementById("myform").submit();
                }
            }
            function checkValue(){
                var isOK=true;
                var code=0;
                var tmpStr="";
                var msg="";
                tmpStr=document.getElementById("groupname").value;
                if(tmpStr==""){
                    msg+="\n组名称不能为空";
                    isOK=false;
                }
                tmpStr=document.getElementById("groupmemo").value;
                if(tmpStr==""){
                    msg+="\n说明不能为空";
                    isOK=false;
                }
                if(!isOK){
                    alert(msg);
                }
                return isOK;
            }
        </script>
    </head>
    <body>
        <%@include file="/main/bodyhead.jspf" %>
        <br>
        <table align="center" border="1" cellpadding="2" cellspacing="0" width="600px"><tr><td>
                    <table align="center" border="1" cellpadding="0" cellspacing="0" width="800px">
                        <th colspan="2" class="maintitle">添加新用户组</th>
                        <form id="myform" action="addGroupdo.jsp" method="post">
                            <tr>
                                <td class="labelcell">用户组名称:</td>
                                <td class="inputcell" style="width:550px;"><input type="text" id="groupname" name="groupname" style="width:550px;"></td>
                            </tr>
                            <tr>
                                <td class="labelcell">说明:</td>
                                <td class="inputcell"><input type="text" id="groupmemo" name="groupmemo" style="width:550px;"></td>
                            </tr>
                            <tr class="controlline">
                                <td colspan="2">
                                    <input type="button" value="确定" onclick="addgroup()">
                                    <input type="button" value="取消" onclick="window.location='userGroupManager.jsp'">
                                </td>
                            </tr>
                        </form>
                        <tr class="maintitle">
                            <td colspan="2">&nbsp;</td>
                        </tr>
                    </table>
        </td></tr></table>
    </body>
</html>
